<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>识别任务添加</title>
<link th:href="@{../../layui/css/layui.css}" rel="stylesheet" />
</head>
<body>
	<div th:include="header :: right"></div> 
	<div class="layui-body">
    <ul style="padding: 53px 4px;" class="layui-tab-title">
      <li ><a th:href="@{/task/list}">任务列表</a></li>
      <li class="layui-this">识别任务添加</li>
    </ul>
    <!-- 内容主体区域 -->
    <div style="padding: 53px 4px;"  >
	   <form class="layui-form" action="/task/save" method="get">
	   	<input type="text" hidden="hidden" name="taskId" th:value="${recognitionTask.taskId}"/>
		  <div class="layui-form-item">
		    <label class="layui-form-label">文件：</label>
		    <div class="layui-input-inline">
		      <!-- <button type="button" class="layui-btn" id=""><i class="layui-icon"></i>上传文件</button> -->
		      <input name="fileName" lay-verify="title"  autocomplete="off" placeholder="请输入文件名称" class="layui-input" th:value="${recognitionTask.fileName}" type="text"/>
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">任务类型：</label>
		    <div class="layui-input-inline">
		      <input name="taskType" lay-verify="title"  autocomplete="off" placeholder="请输入任务类型" th:value="${recognitionTask.taskType}" class="layui-input" type="text"/>
		    </div>
		   </div>
		   <div class="layui-form-item">
		    <label class="layui-form-label">处理状态：</label>
		    <div class="layui-input-inline">
			     <input name="status" lay-verify="title"  autocomplete="off" placeholder="请输入处理状态" class="layui-input" th:value="${recognitionTask.status}" type="text"/>
		    </div>
		  </div>
		   <div class="layui-form-item">
		    <div class="layui-input-block">
		    
		    <span th:if="${ #lists.isEmpty(view)}"> 
		      <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
		     </span>
		      <button type="reset" class="layui-btn layui-btn-primary" onclick="history.go(-1)">返回</button>
		    </div>
		  </div>
	  </form>
    </div>
  </div>
  
  <div class="layui-footer">
    © layui.com - 底部固定区域
  </div>
  <script th:src="@{../../layui/layui.js}"></script>
<script>
//JavaScript代码区域
layui.use('element', function(){
  var element = layui.element;
  
});

layui.use('upload', function(){
	  var upload = layui.upload;
	//指定允许上传的文件类型
	  upload.render({
	    elem: '#test3'
	    ,url: '/upload/'
	    ,accept: 'file' //普通文件
	    ,done: function(res){
	      console.log(res)
	    }
	  });
})

</script>	
	 
</body>
</html>